import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

Widget topShow(String image,String name,double? width){
  return Column(
    children: [
      Image.asset(image,width: width,),
      SizedBox(height: 5,),
      Text(name,style: TextStyle(fontSize: 16.sp,color: Colors.white),)
    ],
  );
}

Widget topShow2(String image,String name,double? width){
  return Container(
    width: 60.w,
    child: Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Image.asset(image,width: width,),
        SizedBox(height: 8.h,),
        Text(name,style: TextStyle(fontSize: 14.sp),)
      ],
    ),
  );
}

Widget subTitle01(String title){
  return Container(
    padding: EdgeInsets.only(left: 10.w,bottom: 5.h,top: 10.h),
    child:Row(
      mainAxisAlignment: MainAxisAlignment.start,
      children: [
        Text(title,style: TextStyle(fontSize: 18.sp,fontWeight: FontWeight.w600),)
      ],
    )
  );
}

Widget subTitle02(String title,String subTitle){
  return Container(
    padding: EdgeInsets.only(left: 10.w,bottom: 5.h,top: 10.h),
    child:Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Text(title,style: TextStyle(fontSize: 18.sp,fontWeight: FontWeight.w600),),
        Row(
          children: [
            Text(subTitle,style: TextStyle(fontSize: 16.sp),),
            Icon(Icons.chevron_right,size: 24,)
          ],
        )
      ],
    )
  );
}

Widget feature(Color bgcolor,String title,String content,String im1,String sub1,String im2,String sub2){
  return Container(
    padding: EdgeInsets.only(left: 15.w,top: 10.h),
    width: 0.46.sw,
    child: Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Row(
          children: [
            Text(title,style: TextStyle(fontSize: 16.sp,fontWeight: FontWeight.w600),),
            Icon(Icons.chevron_right,size: 20,)
          ],
        ),
        SizedBox(height: 10.h,),
        Text(content),
        SizedBox(height: 10.h,),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: [
            Column(
              children: [
                Image.asset('assets/$im1',width: 60.h,),
                Text(sub1,style: TextStyle(fontSize: 14.sp),)
              ],
            ),
            Column(
              children: [
                Image.asset('assets/$im2',width: 60.h,),
                Text(sub2,style: TextStyle(fontSize: 14.sp),)
              ],
            )
          ],
        ),
        SizedBox(height:10.h),
      ],
    ),
  );
}

Widget moneyButton(String accout){
  return TextButton(
    onPressed: (){}, 
    child: Text('$accout',style: TextStyle(fontSize: 20.sp,fontWeight: FontWeight.w600),
    ),
    style: TextButton.styleFrom(
      fixedSize: Size(70.w, 50.h),backgroundColor: Colors.black12
    ),
  );

}